# pacmon Makefile

PYTHON=`which python`
PREFIX=/usr/local
DESTDIR=/
RELEASE=lazy03
PKGNAME=pacmon
VERSION=0.7

all: clean
	#sed -i "s|PREFIX|$(PREFIX)|g" pympd
	$(PYTHON) setup.py build

install: all 
	$(PYTHON) setup.py install --prefix $(PREFIX) --root $(DESTDIR)

clean: 
	$(PYTHON) setup.py clean

distclean:
	rm -rf dist/
	rm -rf $(PKGNAME)-*.tar.gz

dist: distclean
	mkdir -p dist/$(PKGNAME)-$(VERSION)
	cp -R *[^dist] dist/$(PKGNAME)-$(VERSION)
	find dist/ -name *.pyc | xargs rm 
	find dist/ -name .svn | xargs rm -rf
	cd dist/ && tar -cvzf ../$(PKGNAME)-$(VERSION).tar.gz $(PKGNAME)-$(VERSION)
